<%@ page import="com.mastercard.labs.Card" %>



<div class="fieldcontain ${hasErrors(bean: cardInstance, field: 'bank', 'error')} required">
	<label for="bank">
		<g:message code="card.bank.label" default="Bank" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="bank" name="bank.id" from="${com.mastercard.labs.Bank.list()}" optionKey="id" required="" value="${cardInstance?.bank?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: cardInstance, field: 'brand', 'error')} ">
	<label for="brand">
		<g:message code="card.brand.label" default="Brand" />
		
	</label>
	<g:textField name="brand" value="${cardInstance?.brand}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: cardInstance, field: 'cvv2', 'error')} ">
	<label for="cvv2">
		<g:message code="card.cvv2.label" default="Cvv2" />
		
	</label>
	<g:textField name="cvv2" value="${cardInstance?.cvv2}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: cardInstance, field: 'expiry', 'error')} ">
	<label for="expiry">
		<g:message code="card.expiry.label" default="Expiry" />
		
	</label>
	<g:textField name="expiry" value="${cardInstance?.expiry}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: cardInstance, field: 'holder', 'error')} ">
	<label for="holder">
		<g:message code="card.holder.label" default="Holder" />
		
	</label>
	<g:textField name="holder" value="${cardInstance?.holder}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: cardInstance, field: 'number', 'error')} ">
	<label for="number">
		<g:message code="card.number.label" default="Number" />
		
	</label>
	<g:textField name="number" value="${cardInstance?.number}"/>
</div>

